//
// Created by chenlei on 2/19/16.
//

#include "MyDialog.h"

MyDialog::MyDialog(QWidget *widget) : QDialog(widget) {
    setAttribute(Qt::WA_DeleteOnClose);

    setupUi(this);
    connect(lineEdit,SIGNAL(textChanged(const QString &)),this,SLOT(getText(const QString &)));
    connect(ok_btn,SIGNAL(clicked()),this,SLOT(accepts()));
    connect(cancel_btn,SIGNAL(clicked()),this,SLOT(cancell()));

}
void MyDialog::getText(const QString &value) {
    qDebug("input:%s",value.toStdString().c_str());
}


void MyDialog::cancell() {
    qDebug("取消按钮时间监听...!!!");
}

/**
 *
 */
void  MyDialog::accepts() {
    qDebug("@@@@绑定点击事件监听.....");
}